﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'FN' AND name = 'ufn_UPDMS_Get_Lang_Set')
	BEGIN
		DROP Function ufn_UPDMS_Get_Lang_Set
	END
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**	Name : ufn_UPDMS_Get_Lang_Set
**	Desc : 사용자아이디로 언어설정값 조회
**	Test Exec Query : select dbo.ufn_UPDMS_Get_Lang_Set ('smstyle')
**	Called by : 전체
**	Program ID : 전체
**	Auth : 송시명
**	Date : 2011-02-24
*******************************************************************************
**	Change History
*******************************************************************************
**	Date:		Author:		Description:
**	--------	--------	---------------------------------------
**	
*******************************************************************************/
CREATE FUNCTION [dbo].[ufn_UPDMS_Get_Lang_Set]
(
@ls_user_id	nvarchar(20)
)
RETURNS nvarchar(200)
AS

BEGIN
    DECLARE @rtn nvarchar(2)
    SET @rtn = ''

    SELECT @rtn = Language_Set
      FROM UPDMS_COM_USER_MGT WITH(NOLOCK)
     WHERE User_Id = @ls_user_id
  
    RETURN LTRIM(RTRIM(@rtn))
  
END